Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding UserAgent Component #34

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JoshuaEstes
Copy link
Member

@JoshuaEstes JoshuaEstes commented Oct 23, 2023

The idea is to have a User Agent object that is created based on the user agent string. This could be set a number of different ways.

UA - Represents the User Agent, should only contain get*, has*, is*, supports* (ie: getVersion, isBot, supportsJavasctipt) methods. Should also support __toString and be able to be serialized

UA Provider - Returns a UA object based on the UA string. I want the ability to have different UA providers so they can be chained together. For example, there could be a Bot UA Provider and Desktop UA Provider. Input is the UA string, output is the UA object

UA Locator - Can use files to store UA information. CSV, INI, XML, etc. The thought is, this could be injected into a UA Provider so that existing files could be used.

UA Builder - Allows providers to quickly build UA objects. Not sure if this would be needed or not

Exceptions - UnknownUserAgentException

@JoshuaEstes JoshuaEstes marked this pull request as draft October 25, 2023 13:59
@JoshuaEstes JoshuaEstes changed the title User Agent Component Adding UserAgent Component Oct 31, 2023
@JoshuaEstes JoshuaEstes added this to the v1.x milestone Nov 3, 2023
* upstream/main: (54 commits)
  [Pager] Doctrine Bridge (SonsOfPHP#175)
  fuckery (SonsOfPHP#174)
  [Money] Add Twig Bridge (SonsOfPHP#173)
  docs
  coverage fix
  typo
  SonsOfPHP#63 | Link Component (SonsOfPHP#170)
  Pager Component (SonsOfPHP#134)
  Pager Contract (SonsOfPHP#133)
  Update README.md (SonsOfPHP#124)
  [Logger] Finish up Logger Component (SonsOfPHP#123)
  Makefile
  [Logger] New Component (SonsOfPHP#120)
  bug
  [HttpMessage] Helper Methods on Uri to make it easier to create Uri objects with query params (SonsOfPHP#119)
  bug fixes
  Bug fix
  Making a few changes and breaking shit (SonsOfPHP#118)
  updating a few docs (SonsOfPHP#117)
  typo
  ...
* main:
  Housekeeping (SonsOfPHP#203)
  [EventDispatcher] Adding a few new things and working on docs (SonsOfPHP#202)
  [Bard] various changes and updates (SonsOfPHP#201)
  Adding Churn PHP as a tool in the repo (SonsOfPHP#200)
  Update symfony/phpunit-bridge requirement from ^6 to ^6 || ^7 (SonsOfPHP#192)
  [Mailer] New Component and Contract (SonsOfPHP#190)
  [Mailer] New Component and Contract (SonsOfPHP#189)
  House Keeping (SonsOfPHP#188)
  [HttpHandler] Component (SonsOfPHP#187)
  [Container] New Component (SonsOfPHP#182)
  [Cookie] New Component & Contract (SonsOfPHP#181)
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5ad14f5) 73.33% compared to head (980990a) 73.33%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #34   +/-   ##
=========================================
  Coverage     73.33%   73.33%           
  Complexity     1362     1362           
=========================================
  Files           208      208           
  Lines          3308     3308           
=========================================
  Hits           2426     2426           
  Misses          882      882           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants